﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Xunit;

namespace System.Windows.Forms.Tests
{
    public class ToolStripDropDownTests
    {
        [Fact]
        public void ToolStripDropDown_Constructor()
        {
            var tsdd = new ToolStripDropDown();

            Assert.NotNull(tsdd);
        }

        [Fact]
        public void ToolStripDropDown_ConstructorOwnerItem()
        {
            var owner = new ToolStripButton();

            var tsdd = new ToolStripDropDown(owner);

            Assert.NotNull(tsdd);
            Assert.Equal(owner, tsdd.OwnerItem);
        }

        [Fact]
        public void ToolStripDropDown_ConstructorOwnerItemBool()
        {
            var owner = new ToolStripButton();
            var isAutoGenerated = true;

            var tsdd = new ToolStripDropDown(owner, isAutoGenerated);

            Assert.NotNull(tsdd);
            Assert.Equal(owner, tsdd.OwnerItem);
            Assert.True(tsdd.IsAutoGenerated);
        }
    }
}
